<!DOCTYPE html>
<style>
div {
    width: 100px;
    height: 100px;
    background-color: blue;
}
.container {
    background-color: red;
    perspective-origin: 150% 150%;
    perspective: 500px;
    transform: scale(0.5, 1);
}
#box1 {
    transform: scale(0.5, 1);
}
#box2a {
    transform: scale3d(-2, 3.5, 0.2) translate(400px);
}
#box2b {
    backface-visibility: visible;
    transform: scale3d(-2, 3.5, 0.2) translate(400px);
}
#box3 {
    transform: scale3d(2, 3.5, 0.2) translate(200px, 100px);
}
#box4 {
    transform: scale(2, 2) translate(50px, 100px);
}
</style>

<div class="container">
    <div id="box1">1</div>
    <div id="box2a">2a</div>
    <div id="box2b">2b</div>
</div>
<div id="box3">3</div>
<div id="box4">4</div>
